﻿<UserControl 
    x:Class="FU.Capstones.IMS.Web.Silverlight.Controls.PartnerSearchControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Groupbox="clr-namespace:Groupbox;assembly=Groupbox" 
    xmlns:Controls1="clr-namespace:FU.Capstones.IMS.Web.Silverlight.Controls">
    
    <Groupbox:GroupBox>
        <Groupbox:GroupBox.Header>
            <TextBlock 
                Text="Tìm kiếm" 
                Style="{StaticResource TextBlockGroupBoxTitleStyle}"/>
        </Groupbox:GroupBox.Header>
        
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <!--Customer code-->
            <TextBlock 
                Style="{StaticResource TextBlockNormalStyle}"
                Grid.Column="0" Grid.Row="0"
                Text="{StaticResource PartnerCodeLabelText}"
                VerticalAlignment="Center"
            />
            <TextBox 
                x:Name="txtCustomerCode"
                Style="{StaticResource TextBoxNormalStyle}"
                Grid.Column="1" Grid.Row="0"
                Text="{Binding Path=PartnerCriteria.PartnerCodeSearch, Mode=TwoWay}"/>

            <!--Customer Name-->
            <TextBlock 
                Style="{StaticResource TextBlockNormalStyle}"
                Grid.Column="0" Grid.Row="1"
                Text="{StaticResource PartnerNameLabelText}"
                VerticalAlignment="Center"/>            
            <TextBox 
                x:Name="txtCustomerName"
                Style="{StaticResource TextBoxNormalStyle}"
                Grid.Column="1" Grid.Row="1"
                Text="{Binding Path=PartnerCriteria.CompanyNameSearch, Mode=TwoWay}"/>

            <!--Address-->
            <TextBlock 
                Style="{StaticResource TextBlockNormalStyle}"
                Grid.Column="2" Grid.Row="0"
                Text="{StaticResource AddressLabelText}"
                VerticalAlignment="Center"
            />
            <TextBox 
                x:Name="txtAddress"
                Style="{StaticResource TextBoxNormalStyle}"
                Grid.Column="3" Grid.Row="0"
                Text="{Binding Path=PartnerCriteria.AddressSearch, Mode=TwoWay}"/>
            <StackPanel
                Grid.Row="1" Grid.Column="3"
                Orientation="Horizontal">
                <CheckBox                                    
                    Style="{StaticResource CheckBoxNormalStyle}"
                    Content="{StaticResource SupplierCheckBoxText}"
                    IsChecked="{Binding Path=PartnerCriteria.IsSupplierSearch, Mode=TwoWay}"
                    />

                <CheckBox                                  
                    Style="{StaticResource CheckBoxNormalStyle}"
                    Content="{StaticResource CustomerCheckBoxText}"
                    IsChecked="{Binding Path=PartnerCriteria.IsCustomerSearch, Mode=TwoWay}"
                    />
            </StackPanel>
            <!--btnSearch-->
            <Controls1:SearchButtonControl 
			    Grid.Column="4" Grid.Row="3"/>
        </Grid>
    </Groupbox:GroupBox>
</UserControl>
